//继承类调用父类的构造函数
#include <iostream>
#include <string>
using namespace std;

class Fish
{
    protected:
        bool FreshWater;
    public:
        Fish(bool IsFreshWater)
        {
            FreshWater =  IsFreshWater;
        }
    void swim(void)
    {
        if(FreshWater)
        {
            cout << "Fresh Air" << endl;
        }
        else cout << "Salty Water" << endl;
    }
};

class Tuna:public Fish
{
    //调用父类的构造函数
public:
    Tuna(bool flag):Fish(flag){}
};

class Carp:public Fish
{
public:
    Carp(bool flag):Fish(flag){}
};

int main()
{
    // Tuna mytuna = new Tuna(false);
    Tuna mytuna(false);
    Carp mycarp (true);
    mytuna.swim();
    mycarp.swim();
    return 0;
}
